Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Foreground deletion for MachineDeployments and MachineSets #11174

Merged
merged 17 commits into from
Sep 26, 2024

Conversation

chrischdi
Copy link
Member

@chrischdi chrischdi commented Sep 11, 2024

What this PR does / why we need it:

Supersedes #10791

This PR implements foreground deletion in the machinedeployment and machineset controllers using a finalizer.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Part of #10710

/area machinedeployment
/area machineset

@k8s-ci-robot k8s-ci-robot added area/machinedeployment Issues or PRs related to machinedeployments area/machineset Issues or PRs related to machinesets cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 11, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 11, 2024
@chrischdi chrischdi changed the title 🌱 Foreground deletion for MachineDeployments and MachineSets 🌱 [WIP] Foreground deletion for MachineDeployments and MachineSets Sep 11, 2024
@chrischdi chrischdi added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Sep 11, 2024
@chrischdi chrischdi changed the title 🌱 [WIP] Foreground deletion for MachineDeployments and MachineSets 🌱 Foreground deletion for MachineDeployments and MachineSets Sep 12, 2024
@chrischdi chrischdi changed the title 🌱 Foreground deletion for MachineDeployments and MachineSets 🌱 [WIP] Foreground deletion for MachineDeployments and MachineSets Sep 12, 2024
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!
Just for confirming my assumption, cluster deletion won't conflict with foreground deletion because MS an machines which are not directly owned by the cluster are filitered out from cluster descendants that are deleted by the cluster controller
(rif filterOwnedDescendants).

Is that correct?

@chrischdi chrischdi changed the title 🌱 [WIP] Foreground deletion for MachineDeployments and MachineSets 🌱 Foreground deletion for MachineDeployments and MachineSets Sep 13, 2024
@sbueringer
Copy link
Member

Nice! Just for confirming my assumption, cluster deletion won't conflict with foreground deletion because MS an machines which are not directly owned by the cluster are filitered out from cluster descendants that are deleted by the cluster controller (rif filterOwnedDescendants).

Is that correct?

Based on e2e test artifacts - I think yes. But I would say let's run it once through the debugger with Tilt to be sure

@chrischdi
Copy link
Member Author

/test pull-cluster-api-e2e-main

test/e2e/cluster_deletion_test.go Outdated Show resolved Hide resolved
test/e2e/cluster_deletion.go Show resolved Hide resolved
test/e2e/cluster_deletion_test.go Show resolved Hide resolved
test/e2e/cluster_deletion.go Outdated Show resolved Hide resolved
test/e2e/cluster_deletion.go Outdated Show resolved Hide resolved
test/e2e/cluster_deletion.go Outdated Show resolved Hide resolved
test/e2e/cluster_deletion.go Outdated Show resolved Hide resolved
test/e2e/cluster_deletion.go Outdated Show resolved Hide resolved
test/e2e/cluster_deletion.go Outdated Show resolved Hide resolved
test/e2e/cluster_deletion_test.go Outdated Show resolved Hide resolved
@chrischdi
Copy link
Member Author

/test pull-cluster-api-e2e-main

Note: still TODO

@chrischdi
Copy link
Member Author

/retest

@chrischdi
Copy link
Member Author

/test pull-cluster-api-e2e-main

@chrischdi
Copy link
Member Author

/test pull-cluster-api-e2e-main

@chrischdi
Copy link
Member Author

/test pull-cluster-api-e2e-main

@chrischdi
Copy link
Member Author

/test pull-cluster-api-e2e-main

@chrischdi
Copy link
Member Author

/retest

machinepool failure

Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, last round of nits

test/e2e/cluster_deletion.go Show resolved Hide resolved
test/e2e/cluster_deletion.go Outdated Show resolved Hide resolved
test/e2e/cluster_deletion.go Outdated Show resolved Hide resolved
test/e2e/cluster_deletion.go Outdated Show resolved Hide resolved
test/e2e/cluster_deletion_test.go Outdated Show resolved Hide resolved
test/e2e/cluster_deletion_test.go Outdated Show resolved Hide resolved
@sbueringer
Copy link
Member

sbueringer commented Sep 25, 2024

Thank you very much!!

/lgtm
/approve

(hold is already set, up to you)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 25, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: f231a37f639144f52238c2a2f634efc34a1cda66

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [fabriziopandini,sbueringer]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sbueringer
Copy link
Member

/test pull-cluster-api-e2e-main

@chrischdi
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 26, 2024
@k8s-ci-robot k8s-ci-robot merged commit d495b4e into kubernetes-sigs:main Sep 26, 2024
18 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Sep 26, 2024
@sbueringer
Copy link
Member

sbueringer commented Sep 26, 2024

cc @vincepri fyi (as you were interested in this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/machinedeployment Issues or PRs related to machinedeployments area/machineset Issues or PRs related to machinesets cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants